﻿@model DFYE.Web.Models.studentDaily
@using DFYE.Web.Models;
@{
    ViewBag.Title = "Create";
    student st = ViewBag.student as student;
    List<studentDailyType> sdt = ViewBag.studentDailyType as List<studentDailyType>;
}

    

<h2>@st.name 的日志新建</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>建立日志</legend>
        @Html.Hidden("studentID", st.ID)
        <div class="editor-label">
            标题
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.title, new { @class = "normal" })
            @Html.ValidationMessageFor(model => model.title)
        </div>

        <div class="editor-label">
           有效性
        </div>
        <div class="editor-field">
            @Html.CheckBoxFor(model => model.able, new { @checked = "checked" })
            @Html.ValidationMessageFor(model => model.able)
        </div>

        <div class="editor-label">
            内容
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.content, new { @class = "larg areaLarg" })
            @Html.ValidationMessageFor(model => model.content)
        </div>

        <div class="editor-label">
            建立时间
        </div>
        <div class="editor-field">
            @Html.TextBox("createDate",DateTime.Now.ToString("yy-MM-dd"))
            @Html.ValidationMessageFor(model => model.createDate)
        </div>

        <div class="editor-label">
            日志类型
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.studentDailyTypeID, new SelectList(sdt, "ID", "name"))
            @Html.ValidationMessageFor(model => model.studentDailyTypeID)
        </div>

@*        <div class="editor-label">
            所属教员
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.teacherID)
            @Html.ValidationMessageFor(model => model.teacherID)
        </div>

        <div class="editor-label">
            教员名称
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.tearcherName)
            @Html.ValidationMessageFor(model => model.tearcherName)
        </div>*@

        <p>
            <input type="submit" value="新建"  class="submitBtn" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("返回列表", "Index")
</div>
<script>

    $("#createDate").attr("readonly", "true").datepicker();
</script>